<div class="form-group" *ngIf="inputData&&form" [formGroup]="form">
  <label class="col-xs-12 col-sm-4 control-label text-right" [attr.for]="inputData.key">{{inputData.label}}</label>
  <div class="col-xs-12 col-sm-8" [ngSwitch]="inputData.controlType">

    <input class="form-control" autocomplete="off" *ngSwitchCase="'textbox'" [formControlName]="inputData.key" [id]="inputData.key">

    <select class="form-control" [id]="inputData.key" *ngSwitchCase="'dropdown'" [formControlName]="inputData.key">
      <option *ngFor="let opt of inputData.options" [value]="opt.key">{{opt.value}}</option>
    </select>

    <input class="form-control" autocomplete="off" *ngSwitchCase="'datepicker'" [formControlName]="inputData.key" [id]="inputData.key" [bsConfig]="{ dateInputFormat: 'YYYY-MM-DD' }" bsDatepicker>
    <input class="form-control" autocomplete="off" *ngSwitchCase="'number'" number [formControlName]="inputData.key" [id]="inputData.key">
    <input class="form-control" autocomplete="off" *ngSwitchCase="CONTROL_TYPE.EnglishAndNumber" pattern="^[0-9a-zA-Z\-]{1,}$"
      [formControlName]="inputData.key" [id]="inputData.key">
  </div>
  <label *ngIf="inputData.required" class="red required">*</label>
  <div class="error-alert" *ngIf="!isValid && getDirtyTouch">
    <div class="error red" [ngSwitch]="errorsType">请输入
      <span *ngSwitchCase="CONTROL_TYPE.NUMBER">数字</span>
      <span *ngSwitchCase="CONTROL_TYPE.EnglishAndNumber">数字或者英文</span>
      <span *ngSwitchDefault>{{inputData.label}}</span>
    </div>
  </div>
</div>
<!-- <label class="toggle toggle-positive" *ngSwitchCase="'switch'" >
      <input type="checkbox"  [formControlName]="inputData.key" [id]="inputData.key" />
      <div class="track">
          <div class="tit" *ngIf="form.value[inputData.key]">{{ inputData.confirmName }}</div>
          <div class="tit right" *ngIf="!form.value[inputData.key]">{{ inputData.cancelName }}</div>
          <div class="handle"></div>
      </div>
  </label> -->
